<?php
namespace App; use Illuminate\Database\Eloquent\Model; class File extends Model { protected $guarded = array(); public $timestamps = false; function deleteFile() { try { Storage::disk($this->driver)->delete($this->path); } catch (\Exception $spd118f7) { \Log::error('File.deleteFile Error: ' . $spd118f7->getMessage(), array('exception' => $spd118f7)); } } public static function getProductFolder() { return 'images/product'; } }